﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WCFEventService;
using System.ServiceModel;

namespace WCFEventServiceClient
{
    class Program
    {
        static void Main(string[] args)
        {
            IMyEvents evnt = new MySubscriber();
            InstanceContext evntCntx = new InstanceContext(evnt);

            EventServiceClient proxy = new EventServiceClient(evntCntx);
            Console.WriteLine("Client subscribe the event from the service at {0}",DateTime.Now.ToString());
            proxy.SubscribeEvent();
            Console.WriteLine("Client call operation which will fire the event");
            proxy.DoSomethingAndFireEvent();
            Console.ReadLine();
        }
    }
}
